import { request } from "@/utils/request.js"

// 优惠券列表
export function couponPage(data = {}) {
	return request({
		url: '/merchant/goods/page',
		data
	})
}

// 核销优惠券
export function couponUseCoupon(data = {}) {
	return request({
		url: '/merchant/coupon/useCoupon',
		data,
		method: 'POST',
		showMsg: true
	})
}

// 优惠券详情
export function couponCouponOrderInfo(data = {}) {
	return request({
		url: '/merchant/coupon/couponOrderInfo',
		data
	})
}

// 用户优惠券列表
export function couponUserCouponPage(data = {}) {
	return request({
		url: '/merchant/coupon/userCouponPage',
		data
	})
}

// 商家优惠券数据
export function couponCouponData(data = {}) {
	return request({
		url: '/merchant/coupon/couponData',
		data
	})
}